home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / stitchSrfHistoryAttributes.m < prev    next >
Encoding:
Text File  |  2003-07-17  |  2.5 KB  |  71 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  Oct 9 1996
  22. //  Author:         RS 
  23. //
  24. //  Description:
  25. //        These procs create the controls for the history attributes produced 
  26. //        by the stitchSrf tool. 
  27. //
  28.  
  29. global proc stitchSrfHistoryAttributes( string $parent, string $node, string $hasNodes)
  30. {
  31.    setParent $parent;
  32.  
  33.     // Ramesh NOT sure I reallu need to do this
  34.     // My goal was if it was the tool property sheet
  35.     // then Don't show anything. If it was the working
  36.     // attributes then show stuff. FOR SOME REASON IT NEVER SHOWS
  37.     // ANY of your original attributes!!!
  38.  
  39.        if ($hasNodes == "none") {
  40.         string $pcattr = $node + ".pc" ;
  41.         string $tcattr = $node + ".tc" ;
  42.         string $scattr = $node + ".sc" ;
  43.  
  44.         int $npc = `getAttr -size $pcattr` ;
  45.         int $ntc = `getAttr -size $tcattr` ;
  46.         int $nsc = `getAttr -size $scattr` ;
  47.  
  48.         if( $npc == $nsc && $npc == $nsc && $npc > 0 ) {
  49.  
  50.             float $scount[] = `getAttr $scattr`;
  51.             float $pc[] = `getAttr $pcattr`;
  52.             float $tc[] = `getAttr $tcattr`;
  53.  
  54.             int $i ;
  55.  
  56.             for( $i = 0 ; $i < $npc ; $i++ ) {
  57.                 string $pcLabel = "Position" ;
  58.                 string $tcLabel = "Tangent" ;
  59.                 string $scLabel = "Sample Count" ;
  60.  
  61.                 string $pcName_CheckBoxGrp = "PositionalContinuity"+$i ;
  62.                 string $tcName_CheckBoxGrp = "TangentContinuity"+$i ;
  63.                 string $scName_intSliderGrp = "samples"+$i ;
  64.                 checkBoxGrp -ncb 1 -l "Blend Edge" -l1 $pcLabel -v $pc[$i] $pcName_CheckBoxGrp ;    
  65.                 checkBoxGrp -ncb 1 -l1 $tcLabel -v $tc[$i] $tcName_CheckBoxGrp ;    
  66.                 intSliderGrp -f true -min 6 -max 500 -step 1 -v $scount[$i] -l $scLabel $scName_intSliderGrp ;     
  67.             }    
  68.         }
  69.        }
  70.  }
  71.